package lt.ntec.danblog.server.core;

import java.util.ArrayList;
import java.util.List;

public class SysException extends Exception {

    /**
     *
     */
    private static final long serialVersionUID = 4380143820335295624L;
    private List<Message> messages = new ArrayList<Message>();

    public SysException() {
    }

    public SysException(List<Message> messages) {
        this.messages = messages;
    }

    public SysException(Message message) {
        message.getContent();
        this.messages.add(message);
    }

    public SysException(String message) {
    }

    @Override
    public String getMessage() {
        return messages.toString();
    }

    public List<Message> getMessages() {
        return messages;
    }
}
